import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Home from '../views/Home.vue'; // 导入 Home 组件
import about from '../views/about.vue'; // 导入 Home 组件


// 定义你的常量路由
const routerMap : Array<RouteRecordRaw> = [
  // ...其他路由
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'about',
    component: about
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/'
  }
]
// 创建和导出路由
const router = createRouter({
  history: createWebHashHistory(),
  routes: routerMap
})

export default router;